package com.luoxue.execsql.rest.bean.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.luoxue.execsql.rest.bean.base.service.IBaseService;
import com.luoxue.execsql.common.util.BaseEntity;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

import java.util.Collection;
import java.util.Map;
import java.util.function.Function;

public abstract class BaseServiceImpl<T extends BaseEntity, M extends BaseMapper<T>> implements IBaseService<T, M> {
    //    @Resource
    protected final M mapper;

    public BaseServiceImpl(M mapper) {
        this.mapper = mapper;
    }

    @Override
    public BaseMapper<T> getBaseMapper() {
        return mapper;
    }

    @Override
    public boolean saveBatch(Collection<T> entityList, int batchSize) {
        throw new NotImplementedException();
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize) {
        throw new NotImplementedException();
    }

    @Override
    public boolean updateBatchById(Collection<T> entityList, int batchSize) {
        throw new NotImplementedException();
    }

    @Override
    public boolean saveOrUpdate(T entity) {
        throw new NotImplementedException();
    }

    @Override
    public T getOne(Wrapper<T> queryWrapper, boolean throwEx) {
        throw new NotImplementedException();
    }

    @Override
    public Map<String, Object> getMap(Wrapper<T> queryWrapper) {
        throw new NotImplementedException();
    }

    @Override
    public <V> V getObj(Wrapper<T> queryWrapper, Function<? super Object, V> mapper) {
        throw new NotImplementedException();
    }

    @Override
    public Class<T> getEntityClass() {
        throw new NotImplementedException();
    }
}
